package com.cskaoyan.mapper.cart;

import com.cskaoyan.bean.cart.Cart;
import com.cskaoyan.bean.cart.CartExample;
import com.cskaoyan.vo.wx.CartAndGoodsAndProductVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface CartMapper {
    long countByExample(CartExample example);

    int deleteByExample(CartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    List<Cart> selectByExample(CartExample example);

    Cart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByExample(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    CartAndGoodsAndProductVo getCartMessagesWithSnName(@Param("goodsId") Integer goodsId, @Param("productId") Integer productId);

    Integer selectByGoodsIdAndProductId(@Param("productId") int productId, @Param("goodsId") int goodsId, @Param("userId") int userId);

    Short selectGoodsNum(@Param("userId") Integer userId, @Param("goodsId") Integer goodsId, @Param("productId") Integer productId);

    BigDecimal selectFrightPrice();

    BigDecimal selectFrightPriceJudge();
}